home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libgphoto2-2.postinst < prev    next >
Encoding:
Text File  |  2007-04-02  |  1.2 KB  |  47 lines

  1. #!/bin/sh
  2. set -e
  3.  
  4. # Automatically added by dh_makeshlibs
  5. if [ "$1" = "configure" ]; then
  6.     ldconfig
  7. fi
  8. # End automatically added section
  9.  
  10.  
  11. PACKAGE="libgphoto2"
  12.  
  13. case "$1" in
  14.     configure)
  15.     # create FDI file
  16.     mkdir -p /usr/share/hal/fdi/preprobe/10osvendor/ || true
  17.     /usr/lib/$PACKAGE/print-camera-list hal-fdi > \
  18.         /usr/share/hal/fdi/preprobe/10osvendor/20-$PACKAGE.fdi
  19.     
  20.     # remove old fdi files
  21.     rm -f /usr/share/hal/fdi/information/10freedesktop/10-camera-$PACKAGE.fdi
  22.     rm -f /usr/share/hal/fdi/information/20thirdparty/$PACKAGE.fdi
  23.     rm -f /usr/share/hal/fdi/information/10freedesktop/10-camera-$PACKAGE-device.fdi
  24.  
  25.     # create udev rules file
  26.     if [ -d /etc/udev/ ]; then
  27.             if which udevinfo >/dev/null && udevinfo -V | awk '{if ($3 >= 98) exit 1}'; then
  28.                 /usr/lib/$PACKAGE/print-camera-list udev-rules mode 0660 group plugdev > /etc/udev/rules.d/45-$PACKAGE.rules
  29.             else
  30.                 /usr/lib/$PACKAGE/print-camera-list udev-rules-0.98 mode 0660 group plugdev > /etc/udev/rules.d/45-$PACKAGE.rules
  31.             fi
  32.     fi
  33.     ;;
  34.  
  35.     abort-upgrade|abort-remove|abort-deconfigure)
  36.         ;;
  37.  
  38.     *)
  39.         echo "postinst called with unknown argument \`$1'" >&2
  40.         exit 1
  41.         ;;
  42. esac
  43.  
  44.  
  45. exit 0
  46.  
  47.